home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.m68k
- Path: netcom.com!ludis
- From: ludis@netcom.com (Ludis Langens)
- Subject: Re: [?] Wait state generator - 68k
- Message-ID: <ludisDovGqI.412@netcom.com>
- Organization: It's here somewhere
- References: <4j5hc2$roc@pulp.ucs.ualberta.ca> <4j7j56$ffc@pulp.ucs.ualberta.ca>
- Date: Tue, 26 Mar 1996 11:18:18 GMT
- Sender: ludis@netcom11.netcom.com
-
- In article <4j7j56$ffc@pulp.ucs.ualberta.ca> jdv@ee.ualberta.ca (John Voth) writes:
- >>>I have a device that asserts "ready" - a signal used on Intel mpu's such
- >>>as the 8086. Well, I am trying to interface this chip to the mc68k and
- >>>as many of you out there know already, the mc68k hasn't got this
- >>>"feature" built into it.
- >
- >>Use the 'READY' line to hold off the '/DTACK' signal to the 68K. This will
- >>automatically insert wait states when req'd. If 'READY' is active high then
- >>the invert this line to create '/DTACK'. BUT do remember that /DTACK is a
- >>wired OR signal to the 68K.
- >
- >Looking in the Motorola databooks, the waveforms for asynchronous bus
- >cycles show that DTACK and AS are de-asserted at the same time. I would
- >like to know which one has to or needs to be de-asserted before the
- >other. That is to ask, which one is de-asserted first?
-
- AS is an output, DTACK is an input. Once AS deasserts, it is expected
- that your device will release DTACK so as not to interfere with the
- next access.
-
- >Another question, if the mc68k continuously monitors the DTACK line
- >- waiting for it to be asserted then does the mc68k wait until it is
- >de-asserted before ending the bus cycle? Or does the mc68k end the bus
- >cycle immediately after receiving the DTACK signal?
-
- The 68k polls the DTACK line once per clock cycle. Upon finding it
- asserted, it will allow the bus cycle to continue to its end. This
- takes about another full clock cycle or so before everything is done.
- If you assert DTACK at the correct part of the clock cycle, you can
- actually deassert it before the bus cycle is done.
-
- >I am wondering if I can simply hold the DTACK asserted until I want to
- >let it go ( presumeably that's when I want to stop adding wait states )
- >then allow the mc68k end the bus cycle?
- >
- >At the moment, I am creating a state machine inside a EP-610 PLD that
- >will sense AS and READY. It will generate a DTACK signal ( duration =
- >1,2 or 3 clock cycles long ) upon sensing a positive transistion of the
- >READY signal. It's alot of work just to create DTACK so, if there are
- >any short cuts that I can take, I would like to find them soon. Thus all
- >the questions the DTACK and AS signal timing.
-
- No, no, no! DTACK is not a WAIT signal as found in some Intel CPUs.
- In fact, it sounds like the READY signal from your device _is_ a
- DTACK (except of the wrong polarity).
-
- You should be able to get by with just a single open-collector gate and
- an inverter. One input is the READY signal from your device. The other
- is the *CS of your device. Configure the gate to assert DTACK only
- when your device signals READY and your CS logic has your device selected.
-
- --
- unsigned long BinToBCD(unsigned long i) {unsigned long t;
- Ludis Langens return i ? (t = BinToBCD(i >> 1), (t << 1) + (i & 1) +
- ludis@netcom.com (t + 858993459 >> 2 & 572662306) * 3) : 0;}
-